import request from '@/utils/request.ts'

import type { loginForm, loginResponseData, userResponseData } from '@/api/user/type.ts'

enum API {
    LOGIN_URL = '/login',
    USERINFO_URL = '/user/info'
}

export const reqLogin = (data: loginForm) =>
    request.post<any, loginResponseData>(API.LOGIN_URL, data)

export const reqUserInfo = () => request.get<any, userResponseData>(API.USERINFO_URL)